package com.googlecode.bip.dao.mysql;

import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.NamingException;
import com.googlecode.bip.dao.utils.DAOBuilder;

/**
 * Handle open and close SQL connection
 */
public abstract class MySQLDAOBuilder<T> extends DAOBuilder<T>
{
    @Override
    final// remove this line
    public Connection getConnection()
        throws NamingException, SQLException
    {
        return MySQLDAOFactory.getConnection();
    }

    @Override
    final// remove this line
    public void closeConnection( Connection connection )
        throws IllegalArgumentException, SQLException
    {
        MySQLDAOFactory.returnConnectionToPool( connection );
    }

}
